<template>
	<view class=" pm20 pt20 pd display-flex">
		<view class="" @tap="hf('/pages/usercenter/index')">
			<view class="display-flex dfdsfxcvxty">
				<view class="vertical-center">
					<view class="usdfdtrytycf ">
						<image :src="basic_info.avatar_url" class="cz"></image>
					</view>
				</view>
				<view class="flex-1 ml10 xcxcrrtreyy">
					<view class="fz22 cf dian dsfdcxtry">
						{{basic_info.nick_name}}
					</view>
					<view class="">
						<image src="@/static/img/djjshd.png" class="dcfxvxvytryy cz"></image>
						<text class="fz22 cf ml5">{{basic_info.score}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="flex-1 display-flex pl20 xzcxzcdrt">
			<view class="flex-1 vertical-center" @tap="hf('/pages/index/index')">
				<image v-if="kxczxdf==0" src="@/static/img/fdsfsda_b.png" mode="widthFix" class="cxvxcvdftry">
				</image>
				<image v-else-if="kxczxdf==1" src="@/static/img/fdsfsda.png" mode="widthFix" class="cxvxcvdftry">
				</image>
			</view>

			<view class="flex-1 vertical-center" @tap="hf('/pages/huati/index')">
				<image v-if="kxczxdf==1" src="@/static/img/fdsfdfd.png" mode="widthFix" class="cxvxcvdftry"></image>
				<image v-else-if="kxczxdf==0" src="@/static/img/fdsfdfda.png" mode="widthFix" class="cxvxcvdftry">
				</image>
			</view>
		</view>
		<view class="vertical-center ">
			<view class="">
				<text class="iconfont icon-saoba cf fz34" @tap="clasdtwr"></text>
				
				<text v-if="store.state.isjysd" class="iconfont icon-jinyin cf fz34 ml20" @tap="xcxcdfgdf(false)"></text>
				<text v-else class="iconfont icon-shengyin cf fz34 ml20" @tap=" xcxcdfgdf(true)"></text>
				<!-- <image src="@/static/img/fdsfdtra.png" class="xzcxzretctry ml20"></image> -->
			</view>
		</view>
	</view>
</template>
<script lang="ts" setup>
	import { onLoad } from "@dcloudio/uni-app"
	import { ref, computed } from "vue"
	import { hf, dxrequest, callBack } from "@/util/index.js"
	import { jxcxzdf,zhsdr } from "@/util/gpttts.js"
	import { store } from "@/store/index.js"
	const basic_info = computed(() => {
		const obj = store.state.userInfo
		try{
			return {
				...obj.basic_info,
				score:obj.profile_info.score
			};
		}catch(e){
			return {}
		}
	});
const xcxcdfgdf = (tr)=>{
	store.state.isjysd=tr
	zhsdr()
}

	const props = defineProps({
		kxczxdf: { type: Number, default: 0 },
	});
	const emit = defineEmits([
		'qingchusr',
	]);
	const clasdtwr = () => {
		emit("qingchusr")
	}
</script>

<style scoped>
	.dsfdcxtry{
		max-width: 120rpx;
	}
</style>